# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=beancount-language-server
pkgver=1.3.3
pkgrel=0
pkgdesc="Language server for Beancount files"
url="https://github.com/polarmutex/beancount-language-server"
license="MIT"
arch="all !armhf" # FTBFS
makedepends="cargo cargo-auditable"
source="https://github.com/polarmutex/beancount-language-server/archive/v$pkgver/beancount-language-server-$pkgver.tar.gz
	fix-version.patch
	"
options="!check net" # no test suite, fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
d016e10ae2de352caf4fcadfb1d52294313f2f0fe81a821be527902e327c29dd355534d26f0e3d9ea9807dc6d5de8f7a69e76457c0d9c3951427cb9ec5682fd7  beancount-language-server-1.3.3.tar.gz
e59d718ad72e7921de83a58edff4fe8b75575f283b00564741d00417e99672a2a1e8ff4f3e58330d4569f6c27fdcfb6496e82010570cb738b07d021b4e617dab  fix-version.patch
"
